//
//  LPCLanguageDefine.h
//  WalkUp
//
//  Created by 李沛池 on 16/10/27.
//  Copyright © 2016年 LPC. All rights reserved.
//

#ifndef LPCLanguageDefine_h
#define LPCLanguageDefine_h

#import "LPCTools.h"

#define KLanguage           [CurrentLanguage hasPrefix:KLanguage_Chinese]==YES?@"zh":@"en"
#define KZone               [CurrentZone isEqualToString:KZone_China]==YES?@"cn":@"us"

#define APP_Language        [[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"] firstObject]

#define CurrentLanguage     [LPCTools getCurrentLanguage]

#define APPLocale_Zone      [[[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLocale"] componentsSeparatedByString:@"_"] lastObject]

#define CurrentZone         [[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLocale"] \
                            rangeOfString:@"_"].location != NSNotFound \
                            ? (([APPLocale_Zone isEqualToString:KZone_China_HK] || [APPLocale_Zone isEqualToString:KZone_China_TW] || [APPLocale_Zone isEqualToString:KZone_China_MO])==YES?KZone_China:APPLocale_Zone) \
                            : KZone_China

#define KLanguage_Chinese   @"zh-Hans"
#define KLanguage_English   @"en"

#define Language_Chinese_Show @"中文(简体)"
#define Language_English_Show @"English"

#define KZone_China         @"CN"
#define KZone_China_TW      @"TW" //台湾
#define KZone_China_HK      @"HK" //香港
#define KZone_China_MO      @"MO" //澳门
#define KZone_English       @"US"

//国际化
#define LPCLocalizedString(Key) NSLocalizedString(Key, nil)


#endif /* LPCLanguageDefine_h */
